﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Travel.Data;
using Travel.Data.Dtos;
using Travel.Data.Inputs;

namespace Travel.Service.User
{
    /// <summary>
    /// 用户相关接口服务
    /// </summary>
    public interface IUserService
    {
        /// <summary>
        /// 登录(手机/邮箱/用户名)
        /// </summary>
        /// <param name="loginInput"></param>
        /// <returns></returns>
        Task<Results<UserDto>> LoginAsync(LoginInput loginInput);
        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="registerInput"></param>
        /// <returns></returns>
        Task<Results<UserDto>> RefisterAsync(RegisterInput registerInput);
        /// <summary>
        /// 激活用户
        /// </summary>
        /// <param name="activeCode">激活码</param>
        /// <returns></returns>
        Task<Results<string>> ActiveUserAsync(long activeCode);
        /// <summary>
        /// 修改个人资料
        /// </summary>
        /// <param name="userProfileInput"></param>
        /// <returns></returns>
        Task<Results<int>> UpdataUserProdileAsync(UserProfileInput userProfileInput);
        /// <summary>
        /// 根据登录账号，发送授权码/验证码（用户可以拿着这个验证码去重置密码）
        /// </summary>
        /// <param name="loginAccount"></param>
        /// <returns></returns>
        Task<Results<int>> ForgetPwdAsync(string loginAccount);
        /// <summary>
        /// 找回密码
        /// </summary>
        /// <returns></returns>
        Task<Results<int>> UpdatePwdhenForgetAsync(UpdatePwdhenForgetInput updatePwdhenForgetInput);
        /// <summary>
        /// 用户分页查询
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<Results<PageDto<UserDto>>> UserQuery(UserQueryInput input);
        /// <summary>
        /// 修改个人密码
        /// </summary>
        /// <param name="updatePwdInput"></param>
        /// <returns></returns>
        Task<Results<int>> UpdatePwdAsync(UpdatePwdInput updatePwdInput);
        /// <summary>
        /// 根据用户ID获取一条数据
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<Results<UserDto>> GetUserByIdAsync(long userId);
        /// <summary>
        /// 根据用户ID删除一条数据
        /// </summary>
        /// <param name="userId">要删除的用户ID</param>
        /// <param name="loginUserId">当前登录人</param>
        /// <returns></returns>
        Task<Results<int>> DeleteUserByIdAsync(long userId, long loginUserId);
        /// <summary>
        /// 添加或者修改用户信息（管理员操作）
        /// </summary>
        /// <returns></returns>
        Task<Results<int>> AddOrUpdataAsync(UserAddOrUpdataInput input);
        /// <summary>
        /// 批量导入用户
        /// </summary>
        /// <param name=""></param>
        /// <param name="loginUserId"></param>
        /// <returns></returns>
        Task<Results<int>> ImportUser(List<Data.Dtos.TravelBusiness.TravelUserDto> travelUserDtos,long loginUserId);
    }
}
